package com.yjy04综合练习;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Scanner;
public class MapS {
        HashMap<String, ArrayList<String>> map=new HashMap<>();
        Scanner scanner = new Scanner(System.in);
        ArrayList<String> arrayList = new ArrayList<>();
        ArrayList<String> arrayList2 = new ArrayList<>();

        public void initData(){

            arrayList.add("曲靖");
            arrayList.add("昆明");
            arrayList2.add("普洱");


            map.put("云南",arrayList);
            map.put("景东",arrayList2);


        }
    public void print(){
        Iterator<String> it=map.keySet().iterator();
        while (it.hasNext()){
            String key=it.next();
            System.out.print(key+"\t");
        }
    }

    public void choose(){

        System.out.println("输入省份");
        String choose = scanner.next();
        switch (choose){

            case "云南", "景东":
                System.out.println(map.get(choose));
                break;
            default:
                System.out.println("未录入");
        }
    }
}


